ExamPlay Light Logo
Přihlaste se

Computer Science for IGCSE & O level - Databases (Section 1 - No. 44)

In the provided example, what would be the correct SQL command to find records where SeatColour is 'Red' AND (White OR Silver)?
SELECT * FROM CAR WHERE SeatColour = 'Red' AND (White OR Silver);
SELECT * FROM CAR WHERE SeatColour = 'Red' AND (White = 'Y' OR Silver = 'Y');
SELECT * FROM CAR WHERE SeatColour = 'Red' OR White = 'Y' OR Silver = 'Y';
SELECT Code FROM CAR WHERE SeatColour = 'Red' AND ('White' OR 'Silver');

Vysvětlení

Option 1 does not work as 'OR' does not work like that in SQL. Option 2 correctly uses the 'AND' operator to combine the conditions.

Komentáře (0)

Přihlaste se pro komentář
Inzerát
BrainBehindX Inc Logo
©2026; Powered By BrainBehindX Inc